package com.nce.service;

import java.util.List;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;
import org.springside.modules.orm.Page;
import org.springside.modules.orm.PropertyFilter;

import com.nce.dao.KeyWordDao;
import com.nce.entity.Keyword;

@Component
@Transactional
public class KeywordService {

	@SuppressWarnings("unused")
	private static Logger logger = LoggerFactory.getLogger(KeywordService.class);
	
	@Autowired
	private KeyWordDao keyWordDao;

	public KeyWordDao getKeyWordDao() {
		return keyWordDao;
	}

	public void setKeyWordDao(KeyWordDao keyWordDao) {
		this.keyWordDao = keyWordDao;
	}

	public Page<Keyword> searchKeyword(Page<Keyword> page,
			List<PropertyFilter> filters) {
		return keyWordDao.findPage(page, filters);
	}

	public void deleteKeyword(Long id) {
		keyWordDao.delete(id);
		
	}

	public void saveKeyword(Keyword entity) {
		keyWordDao.save(entity);
		
	}

	public Keyword getKeyword(Long id) {
		return keyWordDao.get(id);
	}
	
	
	
}
